package fantasyday.wowzolo.web.Character;

import fantasyday.wowzolo.web.common.CommonPage;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.CompoundPropertyModel;

/**
 * Created by IntelliJ IDEA.
 * User: Zolo
 * Date: 2009-1-22
 * Time: 1:31:35
 * To change this template use File | Settings | File Templates.
 */
public class SearchCharacter extends CommonPage {
    public String characterName = "Ming";
    public String realm = "Black DragonFlight";

    public SearchCharacter() {
//        setModel(new CompoundPropertyModel(characterName));
//        setModel(new CompoundPropertyModel(realm));
        
        // Add a FeedbackPanel for displaying our messages
        FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
        add(feedbackPanel);

        // Add a form with an onSumbit implementation that sets a message
        Form form = new Form("form") {
            protected void onSubmit() {
//                info("Character is : " + characterName);
                info("submit!");
            }
        };
        add(form);

        // add a simple text field that uses Input's 'text' property. Nothing
        // can go wrong here
        form.add(new TextField("characterName"));
        form.add(new TextField("realm"));

    }


}
